import request from '@/utils/request'

// 查询光荣榜列表
export function listHonour(query) {
  return request({
    url: '/honour/list',
    method: 'get',
    params: query
  })
}

export function listHonourClick(query) {
  return request({
    url: '/honour/listClick',
    method: 'get',
    params: query
  })
}

// 查询光荣榜详细
export function getUpHonour(honourId) {
  return request({
    url: '/honour/getUpHonour/' + honourId,
    method: 'get'
  })
}
export function getNextHonour(honourId) {
  return request({
    url: '/honour/getNextHonour/' + honourId,
    method: 'get'
  })
}

export function getHonour(honourId) {
  return request({
    url: '/honour/' + honourId,
    method: 'get'
  })
}

// 新增光荣榜
export function addHonour(data) {
  return request({
    url: '/honour',
    method: 'post',
    data: data
  })
}

// 修改光荣榜
export function updateHonour(data) {
  return request({
    url: '/honour',
    method: 'put',
    data: data
  })
}
export function updateHonourClick(data) {
  return request({
    url: '/honour/updateHonourClick',
    method: 'put',
    data: data
  })
}

// 删除光荣榜
export function delHonour(honourId) {
  return request({
    url: '/honour/' + honourId,
    method: 'delete'
  })
}
